package com.easygem.common.model.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * @author 何维佳
 * @version 1.0
 * @className Account
 * @Description TODO
 * @date 2025/1/13 14:04
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("")
@Table(name = "`bg_account`")
public class Account {
    @Id
    @Column(name = "`accountId`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long accountId;

    @Column(name = "`createTime`")
    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;

    @Column(name = "`clientId`")
    @ApiModelProperty("客户编号")
    private Integer clientId;

    @Column(name = "`accountName`")
    @ApiModelProperty("账户名称")
    private String accountName;

    @Column(name = "`indate`")
    @ApiModelProperty("账户有效期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp indate;

    @Column(name = "`platformType`")
    @ApiModelProperty("平台类型")
    private String platformType;

    @Column(name = "`accountType`")
    @ApiModelProperty("账户类型")
    private String accountType;

    @Column(name = "`openDate`")
    @ApiModelProperty("开户日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp openDate;

    @Column(name = "`seatsNumber`")
    @ApiModelProperty("坐席数")
    private Integer seatsNumber;

    @Column(name = "`balance`")
    @ApiModelProperty("账户余额")
    private BigDecimal balance;

    @Column(name = "`callNumber`")
    @ApiModelProperty("呼叫次数")
    private Integer callNumber;

    @Column(name = "`shutdownTime`")
    @ApiModelProperty("关停时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp shutdownTime;

    @Column(name = "`lastCallTime`")
    @ApiModelProperty("最后呼叫时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp lastCallTime;

    @Column(name = "`lastUpdatedDate`")
    @ApiModelProperty("最后更新日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp lastUpdatedDate;

    @Column(name = "`status`")
    @ApiModelProperty("状态")
    private Integer status;

    @Column(name = "`deptId`")
    @ApiModelProperty("部门编号")
    private Long deptId;

    @Column(name = "`appId`")
    @ApiModelProperty("应用key")
    private String appId;

    @Column(name = "`appSecret`")
    @ApiModelProperty("应用秘钥")
    private String appSecret;

    @Column(name = "`agentNum`")
    @ApiModelProperty("签约座席数")
    private Integer agentNum;

    @Column(name = "`noPackageBalance`")
    @ApiModelProperty("非套餐余额")
    private BigDecimal noPackageBalance;

    @Column(name = "`packageBalance`")
    @ApiModelProperty("套餐余额")
    private BigDecimal packageBalance;

    @Column(name = "`agentMonthly`")
    @ApiModelProperty("坐席月租")
    private BigDecimal agentMonthly;

    @Column(name = "`voucherNumber`")
    @ApiModelProperty("号码费")
    private BigDecimal voucherNumber;

    @Column(name = "`packageRate`")
    @ApiModelProperty("套餐费率")
    private BigDecimal packageRate;

    @Column(name = "`noPackageRate`")
    @ApiModelProperty("非套餐费率")
    private BigDecimal noPackageRate;

    @Column(name = "`callType`")
    @ApiModelProperty("呼叫类型")
    private Integer callType;

    @Column(name = "`phoneCode`")
    @ApiModelProperty("话机号码")
    private String phoneCode;

    @Column(name = "`regAddress`")
    @ApiModelProperty("注册地址")
    private String regAddress;

    @TableField(exist = false)
    private transient String clientName;

    @TableField(exist = false)
    private transient String linkman;

    @TableField(exist = false)
    private transient String company;

    @TableField(exist = false)
    private transient String phone;

    @TableField(exist = false)
    private transient String clienttype_options;

    @TableField(exist = false)
    private transient Integer clientTypeId;


    @TableField(exist = false)
    private transient String openDateStartTime;

    @TableField(exist = false)
    private transient String openDateEndTime;

    @TableField(exist = false)
    private transient String indateStartTime;

    @TableField(exist = false)
    private transient String indateEndTime;

    @TableField(exist = false)
    private transient String clientNo;

    @TableField(exist = false)
    private transient Integer employeeId_aftermarket;

    @TableField(exist = false)
    private transient String userName;

    @TableField(exist = false)
    private transient String password;

    private transient Long userId;

    @TableField(exist = false)
    private transient Long circuitId;
}
